package com.ht.module.bus.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;


/**
 * <p>
 * 线路信息表，是使用线路沙盘功能规划的线路信息保存表
 * </p>
 *
 * @author hejialun
 * @since 2024-07-29
 */

@TableName("t_route")
@Data
@Accessors(chain = true)
public class TRoute{

	@ApiModelProperty("线路编码")
    @TableId
    private String routeCode;

	@ApiModelProperty("线路名称,根据线路起点区划和终点区划名自动生成")
    @NotEmpty
    private String routeName;

	@ApiModelProperty("线路途经点由多个区划点位构成，中间以逗号分隔")
    private String passingPoindCode;

	@ApiModelProperty("线路起点站点")
    @NotEmpty
    private String stationCodeStart;

	@ApiModelProperty("线路终点站点")
    @NotEmpty
    private String stationCodeEnd;

	@ApiModelProperty("部门id")
    private String deptId;

	@ApiModelProperty("uuid")
    private String createUser;
    private LocalDateTime createDate;
    private String updateUser;
    private LocalDateTime updateDate;
    @ApiModelProperty("01有效,02无效")
    private String state;


    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty("途经站点集合")
    @TableField(exist = false)
    private List<TStation> stations;

    @ApiModelProperty("线路起点站点试题")
    @TableField(exist = false)
    private TStation stationCodeStartEn;

    @ApiModelProperty("线路终点站点实体")
    @TableField(exist = false)
    private TStation stationCodeEndEn;

    @ApiModelProperty("途经点集合")
    @TableField(exist = false)
    private List<TStation> passingPoindCodeEns;

        @ApiModelProperty("创建人姓名")
    @TableField(exist = false)
    private String createUserName;
}
